from rest_framework import serializers
from .models import HomeCarousel, PrimaryClassification, SecondaryClassification, HotSearchKeyword

class HomeCarouselSerializer(serializers.ModelSerializer):
  class Meta:
    model = HomeCarousel
    fields = ('id', 'name', 'link_url', 'is_show', 'car_img')

class PrimaryClassificationSerializer(serializers.ModelSerializer):
  class Meta:
    model = PrimaryClassification
    fields = ('id', 'name', 'is_show', 'category_ico', 'created_time', 'updated_time')

class SecondaryClassificationSerializer(serializers.ModelSerializer):
  class Meta:
    model = SecondaryClassification
    fields = ('id', 'name', 'is_show', 'upper_level', 'created_time', 'updated_time')

class HotSearchKeywordSerializer(serializers.ModelSerializer):
  class Meta:
    model = HotSearchKeyword
    fields = ('id', 'name', 'is_show')